package cn.eric.framework.auth.domain;

import javax.xml.bind.annotation.*;
import java.util.List;

@XmlRootElement(name = "eauth", namespace = "http://www.eric.cn/eauth/schema")
@XmlAccessorType(XmlAccessType.NONE)
public class EAuthCfg {
    @XmlElementWrapper(name = "authorities")
    @XmlElement(name = "authority")
    private List<Authority> authorities;
    @XmlElementWrapper(name = "roles")
    @XmlElement(name = "role")
    private List<Role> roles;
    @XmlElementWrapper(name = "rules")
    @XmlElement(name = "rule")
    private List<Rule> rules;

    @Override
    public String toString() {
        return "EAuthCfg{" +
                "authorities=" + authorities +
                ", roles=" + roles +
                ", rules=" + rules +
                '}';
    }

    public List<Authority> getAuthorities() {
        return authorities;
    }

    public void setAuthorities(List<Authority> authorities) {
        this.authorities = authorities;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public List<Rule> getRules() {
        return rules;
    }

    public void setRules(List<Rule> rules) {
        this.rules = rules;
    }
}
